import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class RowDemo extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Container(
      width: 700,
      height: 500,
      color: Colors.black26,
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceAround,
        crossAxisAlignment: CrossAxisAlignment.center,
        children: <Widget>[
          IconContainer(30, Icons.ac_unit, Colors.yellow),
          IconContainer(30, Icons.ac_unit, Colors.yellow),
          IconContainer(30, Icons.ac_unit, Colors.yellow),
          IconContainer(30, Icons.ac_unit, Colors.yellow),
          IconContainer(30, Icons.ac_unit, Colors.yellow),
          IconContainer(30, Icons.ac_unit, Colors.yellow),
          IconContainer(30, Icons.ac_unit, Colors.yellow),
          IconContainer(30, Icons.ac_unit, Colors.yellow),
        ],
      ),
    );
  }
}

class IconContainer extends StatelessWidget {
  double size;

  IconData icon;
  Color color;

  IconContainer(this.size, this.icon, this.color);

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Container(
      width: size,
      height: size,
      color: this.color,
      child: Center(
        child: Icon(
          this.icon,
          color: Colors.white,
          size: this.size,
        ),
      ),
    );
  }
}
